<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.ambow.utils.*"%>
<%@page import="com.ambow.Entity.*"%>
<%@page import="com.ambow.*"%>
<%@page import="org.hibernate.*"%>
<%@page import="com.ambow.service.impl.*"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta name="Keywords" content="关键词1,关键词2，关键词3,关键词4,……" />
<meta name="Description" content="你网页的简述" />
<meta name="Robots" content="All" />
<meta name="Generator" content="Dreamweaver" />
<title>出库查询</title>
<link href="<%=path %>/static/css/css.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
<link rel="stylesheet" href="/resources/demos/style.css"/>
<script src="https://code.jquery.com/jquery-1.12.4.js "></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js "></script>
<script>
$( function(){
    $( "#deliverDatefrm" ).datepicker({ dateFormat: 'yy-mm-dd' });
    $( "#deliverDateto" ).datepicker({ dateFormat: 'yy-mm-dd' });
  } );
</script>
<script>
			function yan() {
				if (frm.deliverDatefrm.value == "") {
					alert("开始查询时间不能为空！");//弹出提示框
					document.frm.deliverDatefrm.focus();//获取鼠标焦点
					return (false);
				} else if (frm.deliverDateto.value == "") {
					alert("结束查询时间不能为空！");
					document.frn.deliverDateto.focus();
					return (false);
				}
			}
		</script>
</head>

<body>
	<h3 id="subTitle">出库查询</h3>
	<form name="frm" method="post" action="<%=path%>/StockServlet?status=queryByDate" onsubmit="return yan()">
		<table width="90%" border="0" align="center" cellpadding="0"
			cellspacing="0" class="table2">
			<tr>
				<td nowrap="nowrap">按出库时间查询： <input name="deliverDatefrm"
					type="text" class="input2" id="deliverDatefrm"/> 至 <input name="deliverDateto"
					type="text" class="input2" id="deliverDateto"/> <input name="Submit" type="submit"
					class="buttonInp" value="查 询" /></td>
			</tr>
		</table>
	</form>

	<table width="90%" border="0" align="center" cellpadding="0"
		cellspacing="0" class="table" style="margin-top: 10px;">
		<tr>
			<th width="27%" align="center" nowrap="nowrap" class="title2">教材名称</th>
			<th width="8%" align="center" nowrap="nowrap" class="title2">版次</th>
			<th width="8%" align="center" nowrap="nowrap" class="title2">作者</th>
			<th width="20%" align="center" nowrap="nowrap" class="title2">出版社</th>
			<th width="7%" align="center" nowrap="nowrap" class="title2">操作员</th>
			<th width="24%" align="center" nowrap="nowrap" class="title2">出库时间</th>
			<th width="6%" align="center" nowrap="nowrap" class="title2">数量</th>
		</tr>
		<%
			List<TextBook> textBooks = (List) request.getAttribute("textBooks");
			List count = (List) request.getAttribute("count");
			List time = (List) request.getAttribute("time");
			if (textBooks != null && !textBooks.isEmpty()) {
				for (int i = 0; i < textBooks.size(); i++) {
		%>
		<tr class="within2bg">
			<td align="center"><%=textBooks.get(i).getName() %></td>
			<td align="center"><%=textBooks.get(i).getRevision()%></td>
			<td align="center"><%=textBooks.get(i).getAuthor() %></td>
			<td align="center"><%=textBooks.get(i).getPublish() %></td>
			<td align="center">管理员</td>
			<td align="center"><%=time.get(i) %></td>
			<td colspan="2" align="center"><%=count.get(i) %></td>
		</tr>
		<%
			}
			} else {
		%>
		<tr align="center" class="within2bg">
			<td colspan="10" class="no_note">没有符合条件的记录</td>
		</tr>
		<%
			}
		%>
	</table>
</body>
</html>